package thinking.java.initalization.and.clean.up;

/**
 * @author GaoFeng
 * @date 2020/1/3 15:48
 */
public class OptionalTrailingArguments {

    static void f(int required, String... trailing) {
        System.out.println("required: " + required + " ");

        for (String s : trailing) {
            // 打印可变参数
            System.out.println(s + " ");
        }

        // 使用后的效及时的
    }

    public static void  main(String[] args) {
        f(1, "one");
        f(2, "two");
        f(0);
    }
}
